#ifndef AUTONOMOUS_LEARNER_H
#define AUTONOMOUS_LEARNER_H

#include <vector>
#include "src/core/semantic_engine/semantic_reasoner.h"
#include "src/knowledge/evolution/knowledge_evolver.h"

class LearningProblem {
public:
    std::vector<WuBiSymbol> inputSymbols;
    std::vector<WuBiSymbol> expectedOutput;
    double difficulty;
    
    LearningProblem(const std::vector<WuBiSymbol>& input,
                   const std::vector<WuBiSymbol>& expected,
                   double diff = 1.0)
        : inputSymbols(input), expectedOutput(expected), difficulty(diff) {}
};

class AutonomousLearner {
private:
    SemanticReasoner* reasoner;
    KnowledgeEvolver* evolver;
    PerformanceEvaluator* evaluator;
    
public:
    // 自主学习循环
    void autonomousLearningLoop();
    
    // 环境感知与问题发现
    std::vector<LearningProblem> perceiveEnvironment();
    
    // 执行学习过程
    void executeLearning(const std::vector<LearningProblem>& problems);
    
    // 评估学习效果
    PerformanceMetrics evaluatePerformance();
    
    // 知识库进化
    void evolveKnowledgeBase(const PerformanceMetrics& metrics);
};

#endif // AUTONOMOUS_LEARNER_H